<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('新增基础抽取')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-etl-add">
            <input type="hidden" name="fgAct" value="1"/>
            <input type="hidden" name="fgCre" value="1"/>
            <input type="hidden" name="sdDrawcls" value="ods_inter"/>
            <div class="row">
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-3 control-label">编码：</label>
                        <div class="col-sm-8">
                            <input name="cd" class="form-control" type="text">
                        </div>
                    </div>
                </div>
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-3 control-label">名称：</label>
                        <div class="col-sm-8">
                            <input name="na" class="form-control" type="text">
                        </div>
                    </div>
                </div>
            </div>
            <div class="row">
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-3 control-label">请求类型：</label>
                        <div class="col-sm-8">
                            <select name="euReq" class="form-control m-b">
                                <option value="post">POST</option>
                                <option value="get">GET</option>
                            </select>
                        </div>
                    </div>
                </div>
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-3 control-label">个性接口：</label>
                        <div class="col-sm-8">
                            <input name="inter" class="form-control" type="text">
                        </div>
                    </div>
                </div>
            </div>
            <div class="row">
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-3 control-label">系统：</label>
                        <div class="col-sm-8">
                            <select name="sdSys" class="form-control m-b" th:with="type=${@baseSd.getItem('hos_sys')}">
                                <option th:each="item : ${type}" th:text="${item.na}" th:value="${item.cd}"></option>
                            </select>
                        </div>
                    </div>
                </div>
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-3 control-label">目标表：</label>
                        <div class="col-sm-8">
                            <input name="cdTbTar" class="form-control" type="text">
                        </div>
                    </div>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">前置SQL：</label>
                <div class="col-sm-9">
                    <textarea name="sqlBefore" class="form-control" rows="2"></textarea>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">访问路径：</label>
                <div class="col-sm-9">
                    <input name="url" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">参数：</label>
                <div class="col-sm-9">
                    <textarea name="sqlQry" class="form-control" rows="6"></textarea>
                </div>
            </div>
        </form>
        <p style="color: indianred">变量说明：开始时间${DT_DAY_BEGIN},结束时间${DT_DAY_END}。yyyyMMdd格式${D_BEGIN},${D_END}。yyyy-MM-dd格式${D_BEGIN2},${D_END2}。</p>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var prefix = ctx + "etl/base"
        $("#form-etl-add").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/add", $('#form-etl-add').serialize());
            }
        }
    </script>
</body>
</html>